package com.satyam.smooth.dao.generic;

import java.io.Serializable;
import java.util.List;

public interface GenericDAO<T, ID extends Serializable>{

    T findById(ID id);

    T findById(ID id, boolean lock);

    List<T> findAll();

    public List<T> findByExample(T exampleInstance, String[] excludeProperty);

    public List<T> findByExample(T exampleInstance);

    void saveOrUpdate(T entity);

    void delete(T entity);
    
    void deleteById(ID id);

    public boolean exists(T entity);
}
